-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port TabSwitcher, Show Desktop & Workspace applets over to libxfce4windowing #485
Port TabSwitcher, Show Desktop & Workspace applets over to libxfce4windowing #485
Conversation
This PR ports our TabSwitcher over to libxfce4windowing from using libwnck directly. To facilitate this, considerable amounts of the code was gutted or rewritten, for example wm no longer does any sort of cur_tabs tracking. That is left up to TabSwitcher. Instead of rebuilding tabswitcher contents every single time we invoke it, we allow it to handle its own state and handle changes based on libxfce4windowing events. Windows are added / removed automatically, workspace handling is done to support show-all-windows function and workspace swapping, and we leverage sort with our recency list and filter to know when to hide items.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good for a first look over. One thing I notice is that the tab switcher children don't directly subclass FlowBoxChild
. I wonder if it would be a good idea to do that; it would avoid having to get_parent()
and get_child()
whenever you want to do something to them.
Fixes #470
Co-authored-by: Evan Maddock <[email protected]>
Co-authored-by: Evan Maddock <[email protected]>
Use warning and document backwards / forwards logic.
@EbonJaeger I addressed your feedback on the idea of sub-classing GtkFlowBoxChild in b08f5fe 👍 Ready for another round of feedback! 😁 |
Known issue with Workspace Applet port: Windows may not report correct icon. While this is corrected in TabSwitcher with use of AppSysstem, I'm going to refrain from duplicating this code into the Workspace applet as I have to then address some issues with AppSystem instantiation triggering segfaults that may otherwise not exist once we centralize it with @EbonJaeger's Windowing namespace / class in his IconTasklist branch, and don't think it's worth adding in more code that'll need to be cleaned up for what is effectively an issue end users won't experience in final release all consumers of similar logic will have been cleaned up by then. Going to add this to OP as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff! Even though it is a bit of a pain having multiple ports in one PR, it would also be a pain to have them separate 😛
Co-authored-by: Evan Maddock <[email protected]>
Co-authored-by: Evan Maddock <[email protected]>
Co-authored-by: Evan Maddock <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! :)
This PR ports the following features over to libxfce4windowing from using libwnck directly:
Info
TabSwitcher
To facilitate tab switcher port and cleanup, considerable amounts of the code was gutted or rewritten, for example wm no longer does any sort of cur_tabs tracking. That is left up to TabSwitcher.
Instead of rebuilding tabswitcher contents every single time we invoke it, we allow it to handle its own state and handle changes based on libxfce4windowing events. Windows are added / removed automatically, workspace handling is done to support show-all-windows function and workspace swapping, and we leverage sort with our recency list and filter to know when to hide items.
Show Desktop applet
This code implements feature parity with Show Desktop without separately recording any window states. Instead, we just increment over all our stacked windows on the screen and set the minimization state for each window based off the widget toggled state, which gets updated on the screen window_opened and window state changed events.
Workspaces Applet
Nothing really special to note here about the port. I will however highlight a known issue with Workspace Applet port, which is that windows may not report correct icon. While this is corrected in TabSwitcher with use of AppSystem, I'm going to refrain from duplicating this code into the Workspace applet as I have to then address some issues with AppSystem instantiation triggering segfaults that may otherwise not exist once we centralize it with @EbonJaeger's Windowing namespace / class in his IconTasklist branch, and don't think it's worth adding in more code that'll need to be cleaned up for what is effectively an issue end users won't experience in final release all consumers of similar logic will have been cleaned up by then.
Testing Notes
Be sure to reboot to ensure you are using correct budgie-wm, budgie-daemon, budgie-panel.